<!--添加关联链接-->
<div class="dialog_content">
	<form id="info_form" action="{:url('Keyword/addDo')}" method="post">
	<table width="100%" class="table_form">
		<tr> 
			<th width="120">关键词 :</th>
			<td>
				<input type="text" class="input-text" name="word" id="word" size="30">
			</td>
		</tr>
		<tr>
			<th>替换词 :</th>
			<td><input type="text" name="replace_word" id="replace_word" class="input-text" size="30"></td>
		</tr>
		<tr>
			<th>链接地址 :</th>
			<td>
				<input type="text" name="url" id="url" class="input-text" value="http://" size="30">
			</td>
		</tr>

        <tr>
		<th>状态 :</th>
            <td>
                <label><input type="radio" name="status" value="1" checked="checked"> 启用</label>&nbsp;&nbsp;
                <label><input type="radio" name="status" value="0"> 禁用</label>
            </td>
        </tr>
	</table>
	</form>
</div>
<script>
$(function(){
	$.formValidator.initConfig({formid:"info_form",autotip:true});
	$("#word").formValidator({onshow:'请填写关键词',onfocus:'请填写关键词'}).inputValidator({min:1,onerror:'请填写关键词'});
	
	$('#info_form').ajaxForm({success:complate,dataType:'json'});
	function complate(result){
		if(result.status == 1){
			$.dialog.get(result.dialog).close();
			$.yingloujie.tip({content:result.msg});
			setTimeout(function(){window.location.reload();},1000);
		} else {
			$.yingloujie.tip({content:result.msg, icon:'alert'});
		}
	}
});
</script>